Carbon


PurgeCollection

Header: Collections.h Carbon status: Supported

Removes all items in a collection whose attributes match a specified pattern.

void PurgeCollection (
    Collection c, 
    SInt32 whichAttributes, 
    SInt32 matchingAttributes
);
c

A reference to the collection object containing the items you want to remove. The behavior of this function is undefined if you do not provide a reference to a valid collection object.

whichAttributes

A mask indicating which attributes you want to test. You should set the bits of the parameter that correspond to the attributes you want to test.

matchingAttributes

An SInt32 word containing the values of the attributes you want to match.

DISCUSSION

The PurgeCollection function removes from the c collection any items whose attributes match the criteria you specify in the whichAttributes and matchingAttributes parameters.

This function compares the specified attributes of each item in the c collection with the corresponding attributes in the matchingAttributes parameter. If the values of all the specified attributes match, the function removes the item. To avoid purging locked items, you should clear the lock attribute in the whichAttributes and matchingAttributes parameters.

To remove all of the items in a collection with a specified collection tag, use the PurgeCollectionTag function.

To remove every item in a collection, use the EmptyCollection function.

AVAILABILITY

Supported in Carbon. Available in Mac OS 8.1 and later when Carbon 1.0.2 or later is present.


© 2000 Apple Computer, Inc. — (Last Updated 5/8/2000)